package org.raycloud.service;



import org.raycloud.Excption.CheckCodeExcption;
import org.raycloud.Excption.LimitedException;
import org.raycloud.Excption.NoUserFoundExcption;
import org.raycloud.Excption.XHRTimeoutException;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

/**
 * Created by Administrator on 2014/4/4.
 * Time: 14:38
 */
public class demo {
    public static void main(String[] args) {
        TaoBaoSpider sp = new TaoBaoSpider(10086L);
        sp.test();
//        for (long i = 0; i <20000000; i++) {
//            try {
//                Thread.sleep(5000);
//            } catch (InterruptedException e) {
//                e.printStackTrace();
//            }
//            TaoBaoSpider sp = new TaoBaoSpider(i);
//            sp.start();
//            try {
//               sp.start();
//            } catch (NoUserFoundExcption noUserFoundExcption) {
//                System.out.println("用户未找到"+i);
//            } catch (IOException e) {
//                System.out.println("IO异常"+i);
//            } catch (CheckCodeExcption checkCodeExcption) {
//                System.out.println("验证码问题"+i);
//            } catch (TimeoutException e) {
//                System.out.println("链接超时"+i);
//            } catch (XHRTimeoutException e) {
//                System.out.println("XHR频繁等待"+i);
//            } catch (LimitedException e) {
//                System.out.println("用户信息访问受限！更换ip！"+i );
//            }
//        }
    }
}
